# Maintainer:
pkgname=rnnoise
_commit=1cbdbcf1283499bbb2230a6b0f126eb9b236defd
pkgver=0.0.0_git20210122
pkgrel=0
pkgdesc="Recurrent neural network for audio noise reduction"
url="https://jmvalin.ca/demo/rnnoise/"
arch="all"
license="BSD-3-Clause"
makedepends="autoconf automake libtool"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://gitlab.xiph.org/api/v4/projects/xiph%2Frnnoise/repository/archive?sha=$_commit"
builddir="$srcdir/$pkgname-$_commit-$_commit"

prepare() {
	default_prepare

	# Tag proper releases pls
	rm "$builddir/update_version"
	echo "PACKAGE_VERSION='$pkgver'" > "$builddir/package_version"

	./autogen.sh
	./configure --prefix=/usr --build=$CBUILD --host=$CHOST
}

build() {
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
7d37f39bdaaf5f560195b09555d07945ea40ac4689b441b37c134972c0e8b1223136c51dac23d003bdab362acbddc08e047204bb7f0affbbff7b8552ad35265f  rnnoise-0.0.0_git20210122.tar.gz
"
